package com.itheima.wms.controller;

import com.itheima.wms.pojo.CarrierPageDto;
import com.itheima.wms.service.CarrierService;
import com.itheima.wms.utils.PageBean;
import com.itheima.wms.utils.Result;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/carrier")
public class CarrierController {

    private final CarrierService carrierService;

    @GetMapping("/page")
    public Result<PageBean> carrierPage(CarrierPageDto carrierPageDto) {
        PageBean pageBean = carrierService.carrierPage(carrierPageDto);
        return Result.success(pageBean);
    }


}
